package com.example.serialportdemo;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;


public class UserInfo  implements Parcelable {

    private String name;


    protected UserInfo(Parcel in) {
        name = in.readString();
    }

    public static final Creator<UserInfo> CREATOR = new Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel in) {
            return new UserInfo(in);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel parcel, int i) {
        parcel.writeString(name);
    }
}
